package ee.ttu.rakarh.model.data.dao;

import java.util.ArrayList;
import java.util.Collection;
import java.util.List;

import org.hibernate.classic.Session;

import ee.ttu.rakarh.model.data.entities.PriceList;
import ee.ttu.rakarh.model.data.entities.PriceListStatusType;
import ee.ttu.rakarh.util.HibernateUtil;

public class PiceListStatusTypeDAOImpl implements PiceListStatusTypeDAO {

	@Override
	public Collection<PriceListStatusType> getStatuses() {
		List<PriceListStatusType> priceListStatusType = new ArrayList<PriceListStatusType>();
		Session session = null;
		try {
			session = HibernateUtil.getSessionFactory().getCurrentSession();
			session.beginTransaction();
			priceListStatusType = session.createCriteria(PriceListStatusType.class).list();
		}
		catch (Exception e) {
		}finally{			
			//session.close();
		}
		return priceListStatusType;
	}

}
